package com.mtiiot.util;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
//import com.xp.instr.LogProducer;
//import com.xp.instr.mq.constant.ProcessType;

public class PlatFormLog {
	private static Logger logger = LogManager.getLogger(PlatFormLog.class);
	public static void sendLogError_bf(String errorMsg,String module){
//		if(Constants.config.isLogIntoSys()){
//			try {
////				LogProducer lp=new LogProducer();
////				lp.logErrorSend(module, null, Constants.LOGLEVEL_ERROR, errorMsg);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
//		}
	}
	
	public static void sendLogErrorWarning_bf(String warningMsg,String module){
		if(Constants.config.isLogIntoSys()){
//			try {
//				LogProducer lp=new LogProducer();
//				lp.logErrorSend(module, null, Constants.LOGLEVEL_WARNING, warningMsg);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
		}
	}
	
	public static void sendLogProcessStr_bf(String seqNo,String module){
		if(Constants.config.isLogIntoSys()){
//			try {
//				LogProducer lp=new LogProducer();
//				lp.logProcessSend(module, null, seqNo, ProcessType.TYPE_STRART);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
		}
	}
	
	public static void sendLogProcessEnd_bf(String seqNo,String module){
		if(Constants.config.isLogIntoSys()){
//			try {
//				LogProducer lp=new LogProducer();
//				lp.logProcessSend(module, null, seqNo, ProcessType.TYPE_END);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
		}
	}
	
	public static void sendLogRequest_bf(String serverIp,String remoteRequestIp,long requestHandleTime,float requestDataSize,String module){
		if(Constants.config.isLogIntoSys()){
//			try {
//				LogProducer lp=new LogProducer();
//				lp.logRequstSend(module, null, serverIp, remoteRequestIp, requestHandleTime, requestDataSize);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
		}
	}
	
	public static void sendLogServerHeartStart_bf(String serverPort){
		if(Constants.config.isLogIntoSys()){
//			try {
//				LogProducer lp=new LogProducer();
//				lp.logServerHeartSend(serverPort,Constants.SERVERSTATUS_START);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
		}
	}
	
	public static void sendLogServerHeartRunning_bf(String serverPort){
		if(Constants.config.isLogIntoSys()){
//			try {
//				LogProducer lp=new LogProducer();
//				lp.logServerHeartSend(serverPort,Constants.SERVERSTATUS_RUNNING);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
		}
	}
	
	public static void sendLogServerHeartEnd_bf(String serverPort){
		if(Constants.config.isLogIntoSys()){
//			try {
//				LogProducer lp=new LogProducer();
//				lp.logServerHeartSend(serverPort,Constants.SERVERSTATUS_END);
//			} catch (Exception e) {
//				logger.error("log server error:"+e.getMessage());
//			}
		}
	}
}
